﻿using System;
using System.Collections.Generic;
using System.Web;
using System.IO;
using System.Xml.Serialization;

namespace MyWebPagesStarterKit
{
    /// <summary>
    /// Summary description for UserSettings
    /// </summary>
    public class UserSettings : DataManager<UserSettings.Data>
    {
        public UserSettings() : base()
        {
            LoadData();
        }

        protected override string GetDataFilename()
        {
            return string.Format("~/App_Data/UserSettings/{0}.config", HttpContext.Current.User.Identity.Name);
        }

        public string PaletteX
        {
            get { return _data.PaletteX; }
            set { _data.PaletteX = value; }
        }

        public string PaletteY
        {
            get { return _data.PaletteY; }
            set { _data.PaletteY = value; }
        }

        public class Data
        {
            public string PaletteX = "100"; 
            public string PaletteY = "100";
        }
    }
}